package springannotaion;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import springannotaion.bean.User;
import springannotaion.controller.AspectController;

/**
 * @author: wyy-sss
 * @date: 2020-02-09 10:46
 **/
public class AppConfig2 {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AllConfig2.class);
		AspectController bean = context.getBean(AspectController.class);
		bean.add();
//		for (String name : context.getBeanDefinitionNames()) {
//			System.out.println("bean名称等于"+name);
//		}
//		Object d2 = context.getBean("a2");
//		System.out.println(d2);
//		Object user = context.getBean(User.class);
//		System.out.println(user);
//		context.close();
	}
}
